package com.sumainfor.pc.market.service;

import com.sumainfor.pc.market.dao.TenantMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 功能描述:
 * 租客相关
 * @Auther: zhlu
 * @Date: 2019/5/10 13:41
 * @Description:
 */
@Service
public class TenantService {

    @Autowired
    TenantMapper TenantMapper;

    /**
     * 功能描述: 
     * 根据租客编号获取租客资料
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/10 13:42
     */
    public Map<String,Object> getTenantMap(Map<String,Object>params){
        return TenantMapper.getTenantMap(params);
    }

    /**
     * 功能描述: 
     * 获取所有的租客资料
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/15 19:52
     */
    public List<Map<String,Object>>getTenantList(){
        return TenantMapper.getTenantList();
    }

    /**
     * @Description //TODO 通过姓名或者手机号查询租客id
     * @return java.util.List<java.lang.String>
     * @Param [keyWord]
     * @Date 2019/9/17 17:03
     **/
    public List<String> getTenantInfoByNameOrPhone(String keyWord) {
        return TenantMapper.getTenantInfoByNameOrPhone(keyWord);
    }

    /**
     * @Description //TODO 通过合同编号查询租客id
     * @return java.util.List<java.lang.String>
     * @Param [keyWord]
     * @Date 2019/9/17 17:03
     **/
    public List<String> getTenantInfoByPaId(String keyWord) {
        return TenantMapper.getTenantInfoByPaId(keyWord);
    }

    /**
     * @Description //TODO 通过姓名或者手机号查询业主id
     * @return java.util.List<java.lang.String>
     * @Param [keyWord]
     * @Date 2019/9/17 17:03
     **/
    public List<String> getOwnerIdByNameOrPhone(String keyWord) {
        return TenantMapper.getOwnerIdByNameOrPhone(keyWord);
    }

    /**
     * @Description //TODO 通过合同编号查询业主id
     * @return java.util.List<java.lang.String>
     * @Param [keyWord]
     * @Date 2019/9/17 17:03
     **/
    public List<String> getOwnerIdByPaId(String keyWord) {
        return TenantMapper.getOwnerIdByPaId(keyWord);
    }
}
